﻿@using KPIS.GERP.Models.ICM
@model KPIS.GERP.Models.ICM.OfficeSuppliesLot

@if (ViewContext.RouteData.Values["action"].ToString().ToLower() == "UploadPictureOfficeSuppliesLot")
{
    
    @Html.HiddenFor(model => model.OfficeSuppliesLotId, new { @value = ViewBag.OfficeSuppliesLotId })
}


<div class="widget-box">
    <div class="widget-header">
        <h4>รายละเอียดวัสดุ</h4>
    </div>
    <div class="widget-body">
        <div class="widget-body-inner">
            <div class="widget-main">

                <div style="width: 900px;">
                    <div class="controls-field-from-right" style="float: left; width: 500px;">
                        <div class="control-group">
                            <div class="control-label">
                                รหัสวัสดุ :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.MasResourceItem.Code, new { disabled = "disabled" })
                            </div>
                        </div>

                        <div class="control-group">
                            <div class="control-label">
                                ชื่อวัสดุ :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.MasResourceItem.Name, new { disabled = "disabled", style = "width:420px;" })
                            </div>
                        </div>

                        <div class="control-group">
                            <div class="control-label">
                                ประเภทวัสดุ :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.MasResourceItem.MasResourceSubGroup.MasResourceGroup.Name, new { disabled = "disabled" })
                            </div>
                        </div>

                        <div class="control-group">
                            <div class="control-label">
                                ชนิดวัสดุ :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.MasResourceItem.MasResourceSubGroup.Name, new { disabled = "disabled" })
                            </div>
                        </div>

                        <div class="control-group">
                            <div class="control-label">
                                ราคากลาง :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.MasResourceItem.StdPrice, new { disabled = "disabled" })
                            </div>
                        </div>

                        <div class="control-group">
                            <div class="control-label">
                                ราคาสูงสุด :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.MasResourceItem.MaxPrice, new { disabled = "disabled" })
                            </div>
                        </div>
                    </div>

                    <div class="controls-field-from-left" style="float: left; width: 400px;">
                        <div class="control-group">
                            <div class="controls">
                                <div class="cboxLoadedContent">
                                    @Html.HiddenFor(model => model.PicturePath)
                                    @if(Model.PicturePath == null)
                                    {
                                        <img  class="cboxPhoto" src="/Content/Ace/assets/OfficeSuppiles/default.gif" />
                                    }
                                    else
                                    {
                                        <a class="cboxElement" data-rel="colorbox" title="Photo" href="/Content/Ace/assets/OfficeSuppiles/@Model.PicturePath">
                                            <img  class="cboxPhoto" src="/Content/Ace/assets/OfficeSuppiles/@Model.PicturePath" />
                                        </a>
                                    }
                                     @Html.ValidationMessageFor(model => model.PicturePath) 
                                </div>
                                <div style="width: 200px;">
                                    <div style="margin: 8px auto auto 20px;">
                                        <input type="file" name="file" id="file"  value="อัพโหลด" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="clear" style="clear: both; width: 0px; height: 0px;"></div>
                </div>

                <div class="control-group">
                    <div style="width: 1300px;">
                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                จุดสั่งซื้อ :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.MasResourceItem.MinQty, new { disabled = "disabled" })
                            </div>
                        </div>

                        <div class="controls-field-from-left" style="float: left; width: 400px;">
                            <div class="control-label">
                                สำรองคลังสูงสุด :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.MasResourceItem.MaxQty, new { disabled = "disabled" })
                            </div>
                        </div>
                        <div class="clear" style="clear: both; width: 0px; height: 0px;"></div>
                    </div>
                </div>

                <div class="control-group">
                    <div style="width: 1300px;">
                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                เลขที่ล็อต :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.LotNo, new { disabled = "disabled" })
                            </div>
                        </div>

                        <div class="controls-field-from-left" style="float: left; width: 400px;">
                            <div class="control-label">
                                สถานที่เก็บ :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.Warehouse.Name, new { disabled = "disabled" })
                            </div>
                        </div>
                        <div class="clear" style="clear: both; width: 0px; height: 0px;"></div>
                    </div>
                </div>

                <div class="control-group">
                    <div style="width: 1300px;">
                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                จำนวน :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.Quantity, new { disabled = "disabled" })
                            </div>
                        </div>

                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                หน่วย :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.MasUnit.Name, new { disabled = "disabled" })
                            </div>

                        </div>
                        <div class="clear" style="clear: both; width: 0px; height: 0px;"></div>
                    </div>
                </div>

                <div class="control-group">
                    <div style="width: 1300px;">
                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                ราคาต่อหน่วย :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.Price, new { disabled = "disabled" })
                            </div>
                        </div>

                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                วันที่หมดอายุการใช้งาน :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.ExpireDate, new { disabled = "disabled" })
                            </div>

                        </div>
                        <div class="clear" style="clear: both; width: 0px; height: 0px;"></div>
                    </div>
                </div>

                <div class="control-group">
                    <div class="control-label">
                        รายละเอียด :
                    </div>
                    <div class="controls">
                        @Html.TextAreaFor(model => model.Description, new {style = "width:750px; height: 90px;" })
                    </div>
                </div>

                <div class="control-group">
                    <div class="control-label">
                        โครงการ :
                    </div>
                    <div class="controls">
                        @Html.TextBoxFor(model => model.ProjectExpense.Project.Name, new { disabled = "disabled", style = "width:550px;" })
                    </div>
                </div>

                <div class="control-group">
                    <div style="width: 1300px;">
                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                ประเภทแหล่งเงิน :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.ProjectExpense.MasBudgetSource.Name, new { disabled = "disabled" })
                            </div>
                        </div>

                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                ประเภทงบ :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.ProjectExpense.MasBudgetExpense.MasBudgetExpenseGroup.Name, new { disabled = "disabled" })
                            </div>

                        </div>
                        <div class="clear" style="clear: both; width: 0px; height: 0px;"></div>
                    </div>
                </div>

                <div class="control-group">
                    <div style="width: 1300px;">
                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                วิธีการรับเข้า :
                            </div>
                            <div class="controls">
                                @Html.DropDownListFor(m => m.ReceiveDtlId, new KPIS.GERP.WEB.GIMS.IcmMasLookUpService.IcmMasLookUpServiceClient().MasLookUpSelectList(KPIS.GERP.Models.ICM.IcmMasLookUpType.LookUpType.ReceiveType), new {disabled = "disabled"})
                            </div>
                        </div>

                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                วันที่รับเข้า :
                            </div>
                            <div class="controls">
                                @Html.TextBoxFor(model => model.ReceiveDtl.CreatedWhen, new { disabled = "disabled" })
                            </div>

                        </div>
                        <div class="clear" style="clear: both; width: 0px; height: 0px;"></div>
                    </div>
                </div>

                <div class="control-group">
                    <div class="control-label">
                        หมายเหตุ :
                    </div>
                    <div class="controls">
                        @Html.TextAreaFor(model => model.Remark, new { style = "width:750px; height: 90px;" })
                    </div>
                </div>

            </div>
        </div>
    </div>

</div>

